Update hash to remove any built targets unless we run in update mode#3543
Open
tmjlewis wants to merge 3 commits into
Open
Update hash to remove any built targets unless we run in update mode#3543tmjlewis wants to merge 3 commits into
tmjlewis wants to merge 3 commits into
Conversation
toastwaffle
requested changes
Jul 8, 2026
| # The parse perf test repo | ||
| /tree | ||
|
|
||
| .vscode No newline at end of file |
Contributor
There was a problem hiding this comment.
plz add trailing newline
Author
There was a problem hiding this comment.
There is a new line now, but it doesn't show in the diff. You can see the new line if you edit the file.
toastwaffle
requested changes
Jul 8, 2026
Comment on lines
+512
to
+514
| // plz hash was building targets to the cache and tagging it with a valid | ||
| // user.plz_build xattr even if the computed hash didn't match the hash in the rule. | ||
| // Make sure we clean up any built targets if we aren't updating the hash aswell |
Contributor
There was a problem hiding this comment.
Comments in the past tense are generally not a good idea
Suggested change
| // plz hash was building targets to the cache and tagging it with a valid | |
| // user.plz_build xattr even if the computed hash didn't match the hash in the rule. | |
| // Make sure we clean up any built targets if we aren't updating the hash aswell | |
| // The code above will build the target(s) and unconditionally write to | |
| // the cache. If we're not updating the hash, we need to clear the target(s) | |
| // from the cache again to ensure that future builds depending on the | |
| // target(s) are not able to proceed despite a potentially mismatched hash. |
toastwaffle
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently run plz hash will build it's targets in the local cache in /plz-out., Even if the target built doesn't match it's hash in the build rule.
It is still tagged with a valid
user.plz_build, so the next time we runplz buildwe don't rebuild that target thinking it's valid based on this rule hash attached to it.To get around this
plz hashnow removes any targets built from the cache if it wasn't ran in update mode.If it's update mode there is no issue because the hash of the target will be used to update the rule, so there is no issue with them falling out of sync.